import React from 'react';
import { createBrowserRouter } from 'react-router-dom';
import Layout from '../views/layout'
import Movie from '../views/movie'
import Cinema from '../views/cinema'
import My from '../views/my'
import Detail from '../views/detail'
export const tabbarList = [{
  path: '/',
  element: <Movie></Movie>,
  meta: {
    title: '电影'
  }
}, {
  path: '/cinema',
  element: <Cinema></Cinema>,
  meta: {
    title: '影院'
  }
}, {
  path: '/my',
  element: <My></My>,
  meta: {
    title: '我的'
  }
}]

export const router = createBrowserRouter([{
  path: '/detail/:id',
  element: <Detail></Detail>,
},{
  path: '/',
  element: <Layout></Layout>,
  children: tabbarList
}])